package com.demo.demo.jinhua;

/**
 * Copyright
 *
 * @Author WuHuang
 * @Date 2022/7/8
 */

import java.util.ArrayList;
import java.util.List;

/**
 * 牌类游戏的超级父类
 * @author lzq31
 *
 */
public abstract class CardGameService {

    /**
     * 一副牌
     */
    public List<Poker> cards;

    /**
     * 所有玩家的手牌集合
     */
    public List<FgfCardHand> playersCards;

    /**
     * 游戏名称
     */
    private String gameName;
    /**
     * 玩家数量
     */
    private int playerNums;
    /**
     * 房间号
     */
    private String roomCode;
    /**
     * 当前房间的游戏回合
     */
    private int round;

    /**
     * 洗牌方法
     */
    public void shuffle() {
    // 把当前轮次+1
        setRound(getRound() + 1);
    // 初始化牌
        cards = new ArrayList();
    // 初始化玩家牌
        playersCards = new ArrayList();
    }

    /**
     * 发牌方法
     */
    public abstract void deal();

    /**
     * 关闭牌局方法
     */
    public abstract void close();

    /**************************** Getters and Setters**************************************/


    public List getCards() {
        return cards;
    }


    public void setCards(List cards) {
        this.cards = cards;
    }


    public List getPlayersCards() {
        return playersCards;
    }


    public void setPlayersCards(List playersCards) {
        this.playersCards = playersCards;
    }


    public String getGameName() {
        return gameName;
    }


    public void setGameName(String gameName) {
        this.gameName = gameName;
    }


    public int getPlayerNums() {
        return playerNums;
    }


    public void setPlayerNums(int playerNums) {
        this.playerNums = playerNums;
    }


    public String getRoomCode() {
        return roomCode;
    }


    public void setRoomCode(String roomCode) {
        this.roomCode = roomCode;
    }


    public int getRound() {
        return round;
    }


    public void setRound(int round) {
        this.round = round;
    }

}

